<template>
    <view class="page_root" data-page-name="编辑其他日报" data-page-identification="x_8g9tl7y3bt">
      <!-- UNI_APP_EXEGESIS_START NAVIGATION_TEMPLATE UNI_APP_EXEGESIS_END -->
      <!-- begin vid_zjgll98b7m 自定义模板_z54fqu5wt6 -->
  
      <!-- end vid_zjgll98b7m 自定义模板_z54fqu5wt6 -->
    </view>
  </template>
  <script setup>
  
    import {
      ref,reactive,toRaw,markRaw,
      watch,computed,
      onBeforeMount,onMounted,onBeforeUnmount,onUnmounted,onActivated,onDeactivated,getCurrentInstance
    } from "vue";
    import { useRoute } from 'vue-router';
    const route = useRoute();
    import { get, post, put, del, request, requestWithHeaders } from '@/utils/http/Axios';
    import { isEqual, cloneDeep, isNullOrEmpty, isEmptyArr, isArray, isNullOrUnDef, localGet, traversalTreeStructure, set, checkCaseCondition, throttle, merge, switchCase, dateParse, debounce, isContained } from '@/utils/index';
    import { CovertOptions, getChartsDataSourceConvert } from '@/utils/chart';
    import { propertyFormatByNumber, propertyFormatByPercentage, propertyFormatByDate } from '@/utils/format';
    import { FormFormat } from '@/utils/formFormat'
    import { customAddWaterMarkFunc, generateWaterMarkText } from '@/utils/addWaterMark'
    import dayjs from 'dayjs';
    /*** UNI_APP_EXEGESIS ***
    import { handleRedirect, permission } from '@/utils/common'
    import { onPullDownRefresh, onLoad, onReady, onShow, onHide, onPageScroll } from '@dcloudio/uni-app'
    *** UNI_APP_EXEGESIS ***/
  
  
    // ---------------------------- 属性定义 ----------------------------
    const sourceId = "page3000000101"
  
      // 是否显示菜单按钮
      const isMenuIconShow = false;
      // NAVIGATION_MENU
      const handleShowNavigation = ()=>{};
  
  
    const setTimeOutList = [];
  
  
        const vid_zjgll98b7m_props = reactive({
          code: "",
      });
  
  
  
    // ============================ 属性定义 ============================
  
    // ---------------------------- 元素数据引用 ----------------------------
    // 组件 自定义模板_z54fqu5wt6 ref 的引用
    const vid_zjgll98b7m_ref = ref(null);
    // 动态key的map
    const fieldTypeMap = {};
    // 动态key的map
    const refMap = {vid_zjgll98b7m_ref};
  
    const showState = reactive({
        vid_zjgll98b7m_visible: true,
    })
    // ============================ 元素数据引用 ============================
  
    // ---------------------------- 数据 ----------------------------
  
  
    // ============================ 数据 ============================
  
    // ---------------------------- 方法 ----------------------------
    // ---------------------------- 页面数据 ----------------------------
  
  
    // ============================ 页面数据 ============================
  
    // ---------------------------- 响应 ----------------------------
  
    // ============================ 响应 ============================
  
    // ---------------------------- 函数 ----------------------------
  
    // 自定义函数 返回上一页
    const customFunction_goBack_p68rus9zyc =  (...params) => {
      uni.navigateBack()
    }
  
    // ============================ 函数 ============================
  
    // ---------------------------- 页面参数 ----------------------------
  
    const pageParameter_state = reactive({
        'processInstanceId': undefined,
    })
  
    // ============================ 页面参数 ============================
  
    // ---------------------------- 组件事件处理方法 ----------------------------
  
  
    // ============================ 组件事件处理方法 ============================
  
    // ============================ 方法 ============================
  
    // ---------------------------- 生命周期 ----------------------------
  
    const pageScrollTop = ref(0)
  
    // *** PREVIEW_EXEGESIS ***
    onMounted(() => {
      setPageParams(route.query)
      // 设置表单的rule
      try{
  
      }catch{
          // do nothing
      }
    });
    // *** PREVIEW_EXEGESIS *** //
  
    /*** UNI_APP_EXEGESIS ***
    const routeOption = ref({})
    onLoad((option) => {
      routeOption.value = option;
    });
    onReady(() => {
      setPageParams(routeOption.value)
      // 设置表单的rule
      try{
  
      }catch{
          // do nothing
      }
    });
    // 图表刷新标记
    const uChartsReshowFlag = ref(false);
    onHide(() => { // 页面隐藏后标记置为false(如果不置为false无法触发图表更新)
        uChartsReshowFlag.value = false
    })
    onShow(() => {
        uChartsReshowFlag.value = true; // 页面激活后,标记置为true
  
        setPageParams(routeOption.value)
    })
    onPageScroll(e => {
        pageScrollTop.value = e.scrollTop
    });
    *** UNI_APP_EXEGESIS ***/
  
    const setPageParams = (routerParam)=>{
      const pageParams = [{"dataType":"STRING","dependencies":[],"name":"processInstanceId"}];
      const strategyMap = {
        STRING: (param, paramValue) => {
          pageParameter_state[param.name] = paramValue;
        },
        BOOLEAN: (param, paramValue) => {
          if('true' === (paramValue || '').toLowerCase()) {
            pageParameter_state[param.name] = true
          } else if('false' === (paramValue || '').toLowerCase()) {
            pageParameter_state[param.name] = false
          } else {
            // TODO: 是否要支持toast
            console.error('参数传入错误！类型不匹配！');
          }
        },
        NUMBER: (param, paramValue) => {
          if (!isNaN(paramValue)) {
            pageParameter_state[param.name] = Number(paramValue);
          } else {
            // TODO: 是否要支持toast
            console.error('参数传入错误！类型不匹配！');
          }
        },
        ARRAY: (param, paramValue) => {
          if (isNullOrUnDef(paramValue) || !paramValue || paramValue=== 'undefined') { // default value
            pageParameter_state[param.name] = [];
          } else if(paramValue.trim().startsWith('[') && paramValue.trim().endsWith(']')) {
            try {
              pageParameter_state[param.name] = JSON.parse(decodeURI(paramValue));
            } catch (error) {
              console.error('参数解析失败 ',error);
            }
          } else {
            console.error('参数传入错误！类型不匹配！');
          }
        },
      };
      pageParams.forEach((param) => {
        strategyMap[param.dataType](param, routerParam[param.name])
      });
  
  
    }
  
    onUnmounted(() => {
      // 销毁定时器
      setTimeOutList.forEach(({ repeat, timer }) => {
        repeat ?  clearInterval(timer): clearTimeout(timer);
      });
    });
  
  
    /*** UNI_APP_EXEGESIS ***
    onPullDownRefresh(() => {
      // 下拉刷新
      setTimeout(() => {
          uni.stopPullDownRefresh()
      }, 1000)
    })
    *** UNI_APP_EXEGESIS ***/
  
    // ============================ 生命周期 ============================
  
    // ---------------------------- 数据关联处理 ----------------------------
    // ---------------------------- 组件数据同步 ----------------------------
  
    // ============================ 组件数据同步 ============================
    //
    // ============================ 数据关联处理 ============================
  
    // ---------------------- 不同组件自定义的处理逻辑 ---------------------
  
    // ====================== 不同组件自定义的处理逻辑 ======================
  
  
    // ================================定制化逻辑========================================
  </script>
  <style lang="less" scoped>
    .page_root {
        min-height: 100%;
        box-sizing: border-box;
    }
  </style>
  